package logger;

use IPC::SysV 	qw(IPC_PRIVATE S_IRUSR S_IWUSR);
use Time::HiRes qw(gettimeofday);
use IPC::Msg;

sub log {
	$key = '123456';
	$type = 2;
	$delimiter = ';';
	$msgQID = msgget($key, S_IRUSR | S_IWUSR);
	$time = gettimeofday;
	$sent = $time.$delimiter.'"'.$_[0].'"';
	msgsnd($msgQID, pack('l! a*', $type, $sent), 0);
}1;

